package com.education.ai.context;

import com.education.ai.entity.Admin;

public class AdminContext {
    private static final ThreadLocal<Admin> CURRENT_ADMIN = new ThreadLocal<>();
    public static void setCurrentAdmin(Admin admin) {
        CURRENT_ADMIN.set(admin);
    }
    public static Admin getCurrentAdmin() {
        return CURRENT_ADMIN.get();
    }
    public static void clear() {
        CURRENT_ADMIN.remove();
    }
}
